<style>
    table tbody tr:hover {
        background-color: #a3e2f7 !important;
    }

    .tbody tr:hover {
        background-color: #FFFFFF !important;
    }

    .form-control {
        padding: 0px 1px;
        height: 26px;
    }

    .switch {
        width: 28px;
        height: 14px;
    }

    .switch small {
        width: 14px;
        height: 14px;
    }

    .switch.checked small {
        left: 13px;
    }

    .run_color {
        color: #00a157;
    }

    .stop_color {
        color: #ac2925;
    }

    .info_icon_warn {
        color: #E9DC51;
    }

    .info_icon_error {
        color: #ac2925;
    }

    .info_icon_info {
        color: #54596a;
    }

    .popover {
        max-width: 1000px !important;
    }

    .popover-content {
        padding: 0px;
    }

    .popover_div {

        height: 350px;
        overflow-y: auto;
    }

    .popover_table {
        margin-bottom: 0px;
        width: auto;
    }

    .popover_table_td {
        width: 125px !important;
    }

    .zone_tab {
        color: #000080;
        font-weight: bold;
    }

    .i_class {
        font-size: 18px;
        width: 19px;
    }

    .nav-tabs > li.active > a, .nav-tabs > li.active > a:focus, .nav-tabs > li.active > a:hover {
        background-color: #f4f4f4;
    }

    .remind {
        background-color: #89cff0;
    }

    .error {
        background-color: #ac2925;
    }

    .trInPlan {
        background-color: #e7f0f7;
    }

    .red_color {
        color: red;
    !important;
    }

    .yellow_color {
        color: #98981d;
    !important;
    }

    .red_background_color {
        background-color: red;
    !important;
    }

</style>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    uCloud IP&nbsp;:&nbsp;{{ip}}&nbsp;&nbsp;&nbsp;&nbsp;状态&nbsp;:&nbsp;<span
                        ng-class="{'running':'run_color','stop':'stop_color','error':'stop_color'}[info.vmStatus]">{{info.vmStatus}}</span>
                    <span style="padding-right: 3%;padding-left: 3%;" ng-show="info.plan_name!='null'"><b>项目:</b>
                            <a ng-if="info.isIntegrateIp" href="javascript:void(0);" ng-click="toPlan(info.plan_name)">
                                    {{info.plan_name}}
                            </a>
                            <a ng-if="!info.isIntegrateIp" href="javascript:void(0);" ng-click="toPlan(info.plan_id)">
                                    {{info.plan_name}}
                            </a>
                    </span>
                    <span style="padding-right: 3%;padding-left: 3%;"
                          ng-show="info.plan_name=='null'"><b>项目:</b>无</span>
                    <span style="padding-right: 2%;"><b>环境:</b>{{info.vmInfo.type}}</span>
                    <span><b>初始化日期:</b>2017-01-01</span>
                    <br>
                    <br>
                    <span ng-show="info.vmStatus == 'error' || info.vmStatus == 'stop'" style="color: red;">
                        <i class="fa fa-question-circle"></i>
                        <span>请使用root用户登录{{ip}}输入rt并回车重启ucloud代理, 如果还没有解决, 请联络ucloud负责人(陈同三)</span>
                    </span>
                    <span ng-if="info.vmStatus == 'running'">
                        <span>cpu核数：{{info.cloudStatus.cpu_cores}}</span>
                        <span style="padding-left: 1%;">cpu剩余：{{info.cloudStatus.cpu_free}}</span>
                        <span style="padding-left: 1%;">总内存：{{info.cloudStatus.memory}}</span>
                        <span style="padding-left: 1%;">内存剩余：{{info.cloudStatus.memory_free}}</span>
                        <span style="padding-left: 1%;">磁盘总数：{{info.cloudStatus.disk}}</span>
                        <span style="padding-left: 1%;">磁盘剩余：{{info.cloudStatus.disk_free}}</span>
                    </span>
                </div>
                <table class="tbody">
                    <tr>
                        <td style="width: 250px;">
                            <input type="search" ng-model="filter.app_name" style="width: 220px;"
                                   placeholder="Search App Name Here..."/>
                        </td>
                        <td style="padding-right: 3%;padding-left: 5%; width: 300px;">
                            <input type="checkbox" ng-model="info.isOnlyShowPlanPro" ng-true-value="true"
                                   ng-false-value="false">只显示项目内工程
                        </td>
                        <td style="padding-right: 3%; width: 300px;" ng-if="isUserCanOperateByRole('ucloud_admin')">
                            <button type="button" class="ngdialog-button ngdialog-button-secondary"
                                    ng-click="restartArea();">重启所有应用
                            </button>
                        </td>
                        <td style="padding-left: 5%; width: 200px;" ng-if="!info.isCEnv">
                            <div class="btn-group" ng-if="isUserCanOperateByRole('ucloud_admin')">
                                <button class="btn btn-default">实用工具</button>
                                <button data-toggle="dropdown" class="btn btn-default dropdown-toggle"><span
                                        class="caret"></span></button>

                                <ul class="dropdown-menu">
                                    <li>
                                        <a href="javascript:;" ng-click="goAPI()">查看API</a>
                                    </li>
                                    <li class="divider">
                                    </li>
                                    <li ng-if="isUserCanOperateByRole('ucloud_admin')">
                                        <a href="javascript:void(0);" ng-click="restartAgent();">重启agent</a>
                                    </li>
                                    <li ng-if="isUserCanOperateByRole('ucloud_admin')">
                                        <a href="javascript:void(0);" ng-click="initAgent()">升级agent</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                        <td style="padding-right: 3%;width: 145px;">
                            <div class="btn-group" ng-show="roleShow()||isUserCanOperateByRole('ucloud_admin')">
                                <button class="btn btn-default">批量部署</button>
                                <button data-toggle="dropdown" class="btn btn-default dropdown-toggle"><span
                                        class="caret"></span></button>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a href="javascript:void(0);" ng-click="goOnlineVersion()">切换线上版</a>
                                    </li>
                                    <li>
                                        <a href="javascript:void(0);" ng-click="goPlanVersion()">切换项目版</a>
                                    </li>
                                    <li>
                                        <a href="javascript:void(0);" data-ng-click="batchRelease();">部署</a>
                                    </li>
                                    <li>
                                        <a href="javascript:void(0);"

                                           ng-click="batchStop();">停止</a>
                                    </li>
                                    <li>
                                        <a href="javascript:void(0);"

                                           ng-click="batchRestart();">重启</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                </table>
                <br>
                <span style="color: #3c8dbc;">
                        <i class="fa fa-question-circle"></i>
                        <span>请根据测试需要启动相应的应用, 启动过多可能引起服务变慢或不可用, 必要时请联系陈同三添加内存</span>
                    </span>
                <br>
                <br>
                <ul class="nav nav-tabs">
                    <li class="" data-ng-repeat="zones in info.title track by $index"
                        ng-class="{true:'active',false:''}[$index==0]" ng-click="pagelist(zones)">
                        <a style="cursor: pointer;" uib-popover="{{zones.zone_alias}}" popover-trigger="mouseenter"
                           popover-placement="head" data-toggle="tab"
                           ng-class="{true:'zone_tab',false:''}[zones.zone_title.indexOf('区') != -1]">
                            {{zones.zone_title}}
                        </a>
                    </li>
                </ul>

                <div class="box-body" style=" ">
                    <table class="table table-hover table-bordered text-center">
                        <thead>
                        <tr>
                            <th width="2%">
                                <input type="checkbox" data-ng-click="checkAll();" data-ng-model="info.checkAll"
                                       ng-true-value="true" ng-false-value="false"/>
                            </th>
                            <th>
                                操作
                            </th>
                            <th>
                                服务
                            </th>
                            <th></th>
                            <th>
                                版本信息
                            </th>
                            <th>
                                服务状态
                            </th>
                            <th>
                                交付流程
                            </th>
                            <th>
                                日志
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="app in info.apps |filter:filter|planProFilter:ip:info.isOnlyShowPlanPro|paging:page.index:page.size"
                            ng-class="{true:'trInPlan',false:''}[app.plan_StateShow]">

                            <td width="2%">
                                <input type="checkbox" data-ng-model="app.check" ng-true-value="true"
                                       ng-false-value="false"/>
                            </td>
                            <td style="width: 15%;text-align:left;">
                                <i class="glyphicon glyphicon-briefcase i_class" data-ng-click="doBuild(app);"
                                   ng-show="agentShowType(app).Build && !app.isRunning"
                                   uib-popover="构建" popover-trigger="mouseenter"
                                ></i>

                                <i class="glyphicon glyphicon-briefcase i_class"
                                   ng-hide="agentShowType(app).Build && !app.isRunning"
                                   uib-popover="构建" popover-trigger="mouseenter" style="color: grey;"
                                   aria-hidden="false"></i>

                                <i class="glyphicon glyphicon-cloud-download i_class" data-ng-click="doRelease(app);"
                                   uib-popover="选择版本后可进行发布" popover-trigger="mouseenter"
                                   ng-show="agentShowType(app).Release && !app.isRunning"></i>
                                <i class="glyphicon glyphicon-cloud-download i_class"
                                   uib-popover="选择版本后可进行发布" popover-trigger="mouseenter"
                                   ng-hide="agentShowType(app).Release && !app.isRunning" style="color: grey;"
                                   aria-hidden="false"></i>

                                <i class="glyphicon glyphicon-repeat i_class" data-ng-click="doRestart(app);"
                                   uib-popover="重启服务器,发布过版本后才能进行该操作" popover-trigger="mouseenter"
                                   ng-show="roleShow() && !app.isRunning"></i>

                                <i class="glyphicon glyphicon-repeat i_class"
                                   uib-popover="重启服务器,发布过版本后才能进行该操作" popover-trigger="mouseenter"
                                   ng-hide="roleShow() && !app.isRunning" style="color: grey;" aria-hidden="false"></i>

                                <i class="glyphicon glyphicon-stop i_class" data-ng-click="doStop(app);"
                                   uib-popover="停止服务器,发布过版本后才能进行该操作" popover-trigger="mouseenter"
                                   ng-show="roleShow() && !app.isRunning"></i>

                                <i class="glyphicon glyphicon-stop i_class"
                                   uib-popover="停止服务器,发布过版本后才能进行该操作" popover-trigger="mouseenter"
                                   ng-hide="roleShow() && !app.isRunning"
                                   style="color: grey;" aria-hidden="false"></i>

                                <i class="glyphicon glyphicon-wrench i_class"
                                   ng-show="app.app_name == 'dep' && !info.isCEnv"
                                   data-ng-click="fixApp(app);" uib-popover="修复服务" popover-trigger="mouseenter"></i>

                                <i class="glyphicon glyphicon-refresh i_class"
                                   ng-show="app.db_name != null && app.db_name != '' && app.db_type != null&& app.db_type != '' && !info.isCEnv"
                                   data-ng-click="reImportData(app);" uib-popover="重新导入数据库数据"
                                   popover-trigger="mouseenter"></i>

                            </td>
                            <td style="width: 10%">
                                  <span style="float: left;">
                                      <a href="javascript:void(0)" ng-click="openApp(app);"
                                         ng-if="app.ucUrl != undefined">{{app.app_name}}</a>
                                      <span ng-if="app.ucUrl == undefined">{{app.app_name}}</span>
                                  </span>
                                <img uib-popover="点击跳转至工程{{app.projectInfo.projectName}}构建页面"
                                     ng-if="app.on_beetle == 'true' && app.app_type != 'adempiere' && app.projectInfo != undefined && app.projectInfo.projectName != undefined"
                                     popover-trigger="mouseenter" src="/beetle/image/link.png"
                                     ng-click="link(app.projectInfo.projectName);"
                                     style="cursor: pointer;width: 20px;float: right;">
                            </td>
                            <td style="width: 5%">
                                <a style="color: #EE7600;" popover-title="UCloud部署版本信息" popover-placement="auto right"
                                   popover-trigger="outsideClick" uib-popover-html="app.versionTip"
                                   ng-if="showVersionIcon(app) == 'false'">警告</a>

                                <a style="color: #00a65a;" popover-title="UCloud部署版本信息" popover-placement="auto right"
                                   popover-trigger="outsideClick" uib-popover-html="app.versionTip"
                                   ng-if="showVersionIcon(app) == 'true'">信息</a>

                                <a style="color: #89cff0;" popover-title="UCloud部署版本信息" popover-placement="auto right"
                                   popover-trigger="outsideClick" uib-popover-html="app.versionTip"
                                   ng-if="showVersionIcon(app) == 'remind'">提醒</a>
                                <a style="color: #ac2925;" popover-title="UCloud部署版本信息" popover-placement="auto right"
                                   popover-trigger="outsideClick" uib-popover-html="app.versionTip"
                                   ng-if="showVersionIcon(app) == 'error'">错误</a>
                            </td>

                            <td style="width: 380px;">
                            <span ng-show="app.on_beetle=='true'">
                                <span style="float: left;" ng-show="agentShowType(app).SwitchShow">
                                    <a href="javascript:void(0);"
                                       ng-show="isUserCanOperateByRole('plan_admin','ucloud_admin') || !info.isIntegrateIp"
                                       ng-click="goSwitch(app)"
                                       ng-class="{true:'red_color'}[app.editionInfo != undefined && app.editionInfo.editionNum == 'default' && app.editionInfo.showNum.indexOf('构建成功') == -1]">
                                        {{app.editionInfo.showNum}}
                                    </a>
                                    <span style="float: left;"
                                          ng-hide="isUserCanOperateByRole('plan_admin','ucloud_admin') || !info.isIntegrateIp">
                                        {{app.editionInfo.showNum}}
                                    </span>
                                    <a href="javascript:void(0);" ng-click="goSwitch(app)" style="color: red;"
                                       ng-if="app.editionInfo == '' || app.editionInfo.editionNum == undefined"
                                       uib-popover="当前部署版本已经不存在,或者未选择版本,请选择版本部署" popover-trigger="mouseenter">
                                        请选择版本</a>
                                </span>

                                <span style="float: right;" ng-if="!app.isRunning">
                                    <img style="width: 40px;height: 15px;vertical-align:baseline;"
                                         src="/beetle/image/new.gif"
                                         ng-show="!app.isChanging && agentShowType(app).SwitchShow && app.plan_StateShow && isSwitchShow(app)"
                                         uib-popover="当前部署版本与项目要求不一致,请切换部署" popover-trigger="mouseenter"
                                         ng-click="changePlanBranch(app,true)"/>
                                    <a href="javascript:void(0);"
                                       ng-show="!info.isIntegrateIp && app.to_testCan_publish"
                                       ng-click="changePlanBranch(app,true)" data-placement="top" data-container="body"
                                       data-toggle="popover" data-content="有新提测版本可以发布,点击部署" data-html="true"
                                       data-trigger="hover">
                                        发布
                                    </a>
                                    <a href="javascript:void(0);" ng-click="notReleaseNewEdition(app)"
                                       ng-show="!info.isIntegrateIp && app.to_testCan_publish" data-placement="top"
                                       data-container="body" data-toggle="popover" data-content="不发布" data-html="true"
                                       data-trigger="hover">
                                        不发布
                                    </a>
                                    <a href="javascript:void(0);"
                                       ng-show="info.isIntegrateIp && app.integrationCan_publish"
                                       ng-click="changePlanBranch(app,true)" data-placement="top" data-container="body"
                                       data-toggle="popover" data-content="有新版本可以发布到集成环境,点击部署" data-html="true"
                                       data-trigger="hover">
                                        发布
                                    </a>
                                    <a href="javascript:void(0);" ng-click="notReleaseNewEdition(app)"
                                       ng-show="info.isIntegrateIp && app.integrationCan_publish" data-placement="top"
                                       data-container="body" data-toggle="popover" data-content="不发布" data-html="true"
                                       data-trigger="hover">
                                        不发布
                                    </a>
                                </span>
                                <span style="float: left;" ng-hide="agentShowType(app).SwitchShow">
                                    <span ng-hide="app.editionInfo == '' || app.editionInfo.editionNum == undefined">{{app.editionInfo.showNum}}</span>
                                    <span ng-show="app.editionInfo == '' || app.editionInfo.editionNum == undefined"
                                          style="color: red;"
                                          uib-popover="当前部署版本已经不存在,或者未部署版本,请联系管理员刷新应用" popover-trigger="mouseenter">
                                        未部署版本或已部署版本不存在</span>
                                </span>
                                <i ng-if="(app.projectInfo.proExist != undefined && !app.projectInfo.proExist) || (app.editionInfo.editionExist != undefined && !app.editionInfo.editionExist)"
                                   class="glyphicon glyphicon-warning-sign" uib-popover="部署的版本已不存在，请重新部署或者联系管理员"
                                   popover-trigger="mouseenter" style="color: red;float: right;"></i>
                            </span>
                                <span ng-show="app.on_beetle == 'false'">
                                <span style="float: left;" ng-if="app.version != '-1'">{{app.version}}</span>
                                <span style="float: left;" ng-if="app.version == '-1'">/mnt/winitRelease/latest.product/{{app.app_name}}</span>
                            </span>
                            </td>
                            <td>
                                <!-- <span ng-show="app.infoMsg!=null" style="color: red">!</span> -->
                                <a style="color: #ac2925;" data-toggle="popover" data-placement="auto top"
                                   data-content="{{app.statusTip}}" data-html="true" data-title="状态"
                                   data-trigger="hover" ng-if="showStatusIcon(app) == 'stop'">未启动</a>

                                <a style="color:#00a65a;" data-toggle="popover" data-placement="auto top"
                                   data-content="{{app.statusTip}}" data-html="true" data-trigger="hover"
                                   data-title="状态" ng-if="showStatusIcon(app) == 'running'">启动</a>

                                <img style="width: 15px;height: 15px;vertical-align:baseline;"
                                     src="/beetle/image/loading.gif" ng-if="app.isRunning" data-toggle="popover"
                                     data-placement="auto top" data-content="{{app.statusTip}}" data-html="true"
                                     data-trigger="hover"/>
                            </td>
                            <td>
                                <span ng-if="!app.isRunning">
                                    <a href="javascript:void(0);" ng-click="goLift_test(app)" ng-if="plan_show(app)==''"
                                       ng-show="agentShowType(app).Lift_test" data-placement="top" data-container="body"
                                       data-toggle="popover" data-content="将当前版本提交给测试" data-html="true"
                                       data-trigger="hover">
                                    提测
                                    </a>
                                    <a href="javascript:void(0);" ng-click="goCancel_Lift_test(app)"
                                       ng-if="plan_show(app)=='to_test_edition'"
                                       ng-show="agentShowType(app).Cancel_Lift_test" data-placement="top"
                                       data-container="body" data-toggle="popover"
                                       data-content="取消提测" data-html="true" data-trigger="hover">
                                        取消提测
                                    </a>

                                    <a href="javascript:void(0);" ng-click="goTest(app)"
                                       ng-if="plan_show(app)=='to_test_edition'"
                                       ng-show="agentShowType(app).Test" data-placement="top" data-container="body"
                                       data-toggle="popover"
                                       data-content="开始测试当前版本,点击后会自动部署版本" data-html="true" data-trigger="hover">
                                        测试
                                    </a>
                                    <a href="javascript:void(0);" ng-click="goCancel_Test(app) "
                                       ng-if="plan_show(app)=='testing'" ng-show="agentShowType(app).Cancel_Test"
                                       data-placement="top" data-container="body" data-toggle="popover"
                                       data-content="取消测试" data-html="true" data-trigger="hover">
                                        取消测试
                                    </a>

                                    <a href="javascript:void(0);" ng-click="goTurn_test(app)"
                                       ng-if="plan_show(app)=='testing'"
                                       ng-show="agentShowType(app).Turn_test" data-placement="top" data-container="body"
                                       data-toggle="popover" data-content="申请将当前版本进入集成环境" data-html="true"
                                       data-trigger="hover">
                                        转测
                                    </a>
                                    <a href="javascript:void(0);" ng-click="goCancel_Turn_test(app)"
                                       ng-if="plan_show(app)=='to_integration_edition'"
                                       ng-show="agentShowType(app).Cancel_Turn_test" data-placement="top"
                                       data-container="body"
                                       data-toggle="popover" data-content="取消当前版本进入集成环境的申请" data-html="true"
                                       data-trigger="hover">
                                        取消转测
                                    </a>
                                    <a href="javascript:void(0);" ng-click="goCan_Integration(app)"
                                       ng-if="plan_show(app)=='to_integration_edition'"
                                       ng-show="agentShowType(app).Can_Integration" data-placement="top"
                                       data-container="body"
                                       data-toggle="popover" data-content="允许当前版本进入集成环境" data-html="true"
                                       data-trigger="hover">
                                        可集成
                                    </a>
                                    <a href="javascript:void(0);" ng-click="goCNIntegrate(app)"
                                       ng-if="plan_show(app)=='to_integration_edition'"
                                       ng-show="agentShowType(app).CNIntegrate" data-placement="top"
                                       data-container="body"
                                       data-toggle="popover" data-content="不允许当前版本进入集成环境" data-html="true"
                                       data-trigger="hover">
                                        不可集成
                                    </a>

                                    <a href="javascript:void(0);" ng-click="goIntegrate(app)"
                                       ng-if="plan_show(app)=='integration'"
                                       ng-show="agentShowType(app).Integrate" data-placement="top" data-container="body"
                                       data-toggle="popover"
                                       data-content="开始集成测试当前版本,点击后会自动部署" data-html="true" data-trigger="hover">
                                        集成
                                    </a>
                                    <a href="javascript:void(0);" ng-click="goCancel_Integrate(app)"
                                       ng-if="plan_show(app)=='integrationing'"
                                       ng-show="agentShowType(app).Cancel_Integrate" data-placement="top"
                                       data-container="body"
                                       data-toggle="popover" data-content="版本出现bug,打回" data-html="true"
                                       data-trigger="hover">
                                        版本打回
                                    </a>

                                    <a href="javascript:void(0);" ng-click="goDeliver(app)"
                                       ng-if="plan_show(app)=='integrationing'"
                                       ng-show="agentShowType(app).Deliver" data-placement="top" data-container="body"
                                       data-toggle="popover"
                                       data-content="版本测试通过,可以上线" data-html="true" data-trigger="hover">
                                        测试通过
                                    </a>
                                    <a href="javascript:void(0);" ng-click="goCancel_Deliver(app)"
                                       ng-if="plan_show(app)=='hand_over'"
                                       ng-show="agentShowType(app).Cancel_Deliver" data-placement="top"
                                       data-container="body"
                                       data-toggle="popover" data-content="版本出现bug,打回" data-html="true"
                                       data-trigger="hover">
                                        测试不通过
                                    </a>
                                </span>
                            </td>
                            <td>
                                <button class="btn btn-default btn_class" data-ng-click="openShowLogModal(app)"
                                        uib-popover="日志" popover-trigger="mouseenter">...
                                </button>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <uib-pagination total-items="info.apps|filter:filter|size" ng-model="page.index"
                                max-size="5"
                                previous-text="上一页"
                                next-text="下一页"
                                first-text="首页"
                                last-text="尾页"

                                items-per-page="page.size"

                                class="pagination-sm pull-right" boundary-links="true"></uib-pagination>
            </div>
        </div>
    </div>
</section>


<script type="text/ng-template" id="ucLogModal.html">
    <style type="text/css">
        .modal-content {
            width: 1350px;
            right: 380px;
        }

        .tt tr:hover {
            background-color: #ffffff !important;
        }
    </style>
    <div class="modal-header">
        <h3 class="modal-title">日志
            <small><cite title="Source Title"></cite></small>
        </h3>
    </div>
    <div class="modal-body" id="log_div">
        <table style="height: 500px;" width="100%" class="tt">
            <tr>
                <td>应用日志</td>
                <td>应用安装日志</td>
                <td>数据库导入日志</td>
            </tr>
            <tr>
                <td>
                    <div style="width: 386px;height: 481px;overflow: auto; background-color:#000000;left: 55px;color: #FFFFFF"
                         ng-bind-html="appLogs">
                    </div>
                </td>
                <td>
                    <div style="width: 386px;height: 481px;overflow: auto; background-color:#000000;left: 480px; color: #FFFFFF"
                         ng-bind-html="pip_appLogs">
                    </div>
                </td>
                <td>
                    <div style="width: 386px;height: 481px;overflow: auto; background-color:#000000;left: 910px;color: #FFFFFF"
                         ng-bind-html="pip_dbLogs">
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" type="button" ng-click="Refresh()">刷新</button>
        <button class="btn btn-primary" type="button" ng-click="cancel()">关闭</button>
    </div>
</script>

<script type="text/ng-template" id="Switch.html">
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header" style="margin-top:1px;">
                        <br>
                        <uib-accordion close-others="false">
                            <uib-accordion-group heading="{{title}}" is-open="true">
                                <table width="95%">
                                    <tbody>
                                    <tr>
                                        <td>

                                            <input type="text" ng-model="app.projectInfo"
                                                   uib-typeahead="project as project.projectName for project in app.projectList | filter:{projectName:$viewValue}|limitTo:15"
                                                   typeahead-template-url="selectTemplate.html" class="form-control"
                                                   typeahead-show-hint="true" typeahead-min-length="0"
                                                   typeahead-select-on-blur="true"
                                                   typeahead-on-select="projectChange(app);"/>

                                        </td>
                                        <td>

                                            <input type="text" ng-model="app.editionInfo" placeholder="Select Edition"
                                                   uib-typeahead="edition as edition.showNum for edition in app.editionList | filter:{showNum:$viewValue}|limitTo:15"
                                                   typeahead-template-url="selectTemplate.html" class="form-control"
                                                   typeahead-show-hint="true" typeahead-min-length="0"
                                                   typeahead-select-on-blur="true"
                                                   typeahead-on-select="editionChange(app);"/>

                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </uib-accordion-group>
                        </uib-accordion>
                        <div class="modal-footer">
                            <button class="btn btn-warning" type="button" ng-click="cancel()">确认</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <script type="text/ng-template" id="selectTemplate.html">
        <a>
            <span ng-bind-html="match.label | uibTypeaheadHighlight:query"></span>
        </a>
</script>

</script>

